﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ContactWebsite.Models.Contact>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	ContactList
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Danh sách đăng kí</h2>

    <table>
        <!--<tr>
            <th>
                ID
            </th>
            <th>
                MSSV
            </th>
            <th>
                Name
            </th>
            <th>
                Class
            </th>
            
        </tr>-->
    <%int i = 0; %>
    <% foreach (var item in Model) { %>
    <%i++; %>
        <tr>
            <td>
                <%= Html.Encode(i) %>
            </td>
            <td>
                <%= Html.Encode(item.MSSV) %>
            </td>
            <td>
                <%= Html.Encode(item.Name) %>
            </td>
            <td>
                <%= Html.Encode(item.Class) %>
            </td>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Ajax.ActionLink("Ðãng kiì mõìi", "Create", new AjaxOptions { UpdateTargetId = "divContactList" })%>
    </p>

</asp:Content>

